<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'full_news_people.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>pages/news/first_page/style/backstage.css"
			media="all" />
		<script type="text/javascript" charset="utf-8"
			src="<%=basePath%>/pages/news/js/jquery-1.5.1.min.js"></script>
		<script type="text/javascript" charset="utf-8"
			src="<%=basePath%>/pages/news/js/pagedtable.js"></script>
		<script type="text/javascript" charset="utf-8"
			src="<%=basePath%>/pages/news/js/jquery.contextmenu.js"></script>
		<script type="text/javascript" charset="utf-8"
			src="<%=basePath%>/pages/news/js/jBox-1.0.0.0.js"></script>
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>/pages/news/contextmenu/jquery.contextmenu.css">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>/pages/news/css/jBox.css">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<style type="text/css">
.ui-selectorder {
	font-size: 24px;
}

.ui-selectording {
	margin-right: 10px;
}
</style>
	</head>

	<body>
		<fieldset class="fieldset">
			<legend class="legend">
				用户列表：
			</legend>
			<form action="${contextPath}/login_user/full_news_people/"
				class="form">
				管理员名：
				<input type="text" name="filter_LIKES_name"
					value="${param['filter_LIKES_name'] }" class="form1">
				email：
				<input type="text" name="filter_LIKES_email"
					value="${param['filter_LIKES_email'] }" class="form1">
				管理员类型：
				<select type="text" name="filter_EQI_popleType" class="form1">
					<option value="">
						全部
					</option>
					<option value="1" ${param['filter_EQI_popleType']=="1"?"selected":""}>
						高级管理员
					</option>
					<option value="2" ${param['filter_EQI_popleType']=="2"?"selected":""}>
						一般管理员
					</option>
				</select>
				<input type="submit" value="搜索" class="button1">
			</form>
			<table id="table" border="1" cellpadding="0" cellspacing="0" width="90%"
				class="mytable">
				<thead>
					<tr class="thbt">
						<td class="thbt textcenter" width="120">
							管理员名
						</td>
						<td class="thbt textcenter" width="220">
							email
						</td>
						<td class="thbt textcenter" width="100">
							管理员类型
						</td>
					</tr>
				</thead>
				<tbody>
					<c:forEach var="nps" items="${newsPeoples}">
						<tr class="newspeople tdcolor1" newspeopleid="${nps.id }">
							<td class="textcenter">
								${nps.name }
							</td>
							<td  class="textcenter">
								${nps.email }
							</td>
							<td class="textcenter">
								<c:choose>
									<c:when test="${nps.popleType==0}">超级管理员</c:when>
									<c:when test="${nps.popleType==1}">高级管理员</c:when>
									<c:otherwise>一般管理员</c:otherwise>
								</c:choose>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</fieldset>
		<script type="text/javascript">
    
    var pt = $('#table').pageable({
    	started: 1,
    	pagelimit: 10,
    	limit: 10,
    	insertpager: true,
        dragpager: true,
        fixedwidth: false,
    	pager: '<p class="pager" align="center"></p>',
    	page: '<a href="#" class="ui-selectording"></a>',
    	prev: '<a href="#">上一页&nbsp;&nbsp;&nbsp;&nbsp;</a>',
        next: '<a href="#">&nbsp;&nbsp;下一页</a>',
        selectedclass:'ui-selectorder'
    });
    var menu1 = [
             	{'编辑':function(menuItem,menu) {
             		 window.location.href='${contextPath}/login_user/view_people/?newsPeople.id='+$(this).attr('newspeopleid');
             	},
             	'删除':function(menuItem,menu) {
        			 window.location.href='${contextPath}/login_user/deltenewspeople/?newsPeople.id='+$(this).attr('newspeopleid');
        	}
             	}
             ];
             $(function(){
             	$('.newspeople').contextMenu(menu1,{
             		theme:'vista',
             		showTransition:'fadeIn',hideTransition:'fadeOut',useIframe:false
             		
             	});
             });
    </script>
	</body>
</html>
